package com.Hsu.mq.common;

/**
 * @author Hsu琛君珩
 * @ClassName:ConsumerEnv
 * @date 2024-02-28
 * @apiNote
 * @Version: v1.0
 */

import lombok.Data;

/**
 * 表示一个消费者（完整的执行环境）
 * 封装了消费者的环境信息
 */
@Data
public class ConsumerEnv {
    private String consumerTag;
    private String queueName;
    private boolean autoAck;
    // 通过这个回调来处理收到的消息.
    private Consumer consumer;

    public ConsumerEnv(String consumerTag, String queueName, boolean autoAck, Consumer consumer) {
        this.consumerTag = consumerTag;
        this.queueName = queueName;
        this.autoAck = autoAck;
        this.consumer = consumer;
    }
}